<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">
<ui:composition>
	<div id="mywatchlist">
		<h:form>
			<h1>#{msgs.MyWatchList}</h1>
			<p:dataTable var="thread" value="#{userBackingBean.myDataModel}" paginator="true" rows="20" lazy="true"
				paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink}  {PageLinks}  {CurrentPageReport} {NextPageLink} {LastPageLink}"
				rowsPerPageTemplate="5,10,15" tableStyleClass="noBorderTable" paginatorPosition="bottom" emptyMessage="#{msgs.NoWatchList}">
				<p:column headerText="#{msgs.threadSubjectLabel}" rowStyleClass="whiteBackGround">
					<h:panelGrid columns="2" columnClasses="smallCell" styleClass="noBorder">
						<h:panelGroup styleClass="thumbnail" rendered="#{! empty thread.thumbPicURL}">
							<h:link outcome="/thread/viewthread">
								<f:param name="id" value="#{thread.id}"></f:param>
								<img src="#{thread.thumbPicURL}" class="dealpicInListing" />
							</h:link>
						</h:panelGroup>
						<h:panelGroup styleClass="txt" layout="block">
							<h:link value="#{thread.subject} #{thread.price}" outcome="/thread/viewthread" styleClass="subject">
								<f:param name="id" value="#{thread.id}"></f:param>
								<h:graphicImage name="TopicHot.gif" library="images" rendered="#{(thread.markedHot)}" />
							</h:link>
						</h:panelGroup>
					</h:panelGrid>
				</p:column>

				<p:column headerText="#{msgs.threadReplyHitLabel}" styleClass="nonMainColumn">
					<h:outputText value='#{thread.numberOfReplies}/#{thread.numberOfView}' escape="false"></h:outputText>
				</p:column>
				<p:column headerText="#{msgs.threadAuthorLabel}" styleClass="nonMainColumn">
					<h:outputText value='#{thread.owner.userId}' escape="false"></h:outputText>
				</p:column>

				<p:column headerText="#{msgs.threadLastUpdateLabel}" styleClass="nonMainColumn">
					<h:panelGroup rendered="#{thread.lastReply!=null}">
						<h:outputText value="#{thread.lastReply.owner.userId}" styleClass="block" />
						<h:outputFormat value="#{thread.lastReply.createTime}">
							<f:convertDateTime dateStyle="short" timeStyle="short" type="both" />
						</h:outputFormat>
					</h:panelGroup>
					<h:panelGroup rendered="#{thread.lastReply==null}">
						<h:outputText value="--/--" />
					</h:panelGroup>
				</p:column>
			</p:dataTable>
		</h:form>
	</div>

</ui:composition>
</html>